<template>
  <div class="home">
    <section>
      <router-view></router-view>
    </section>

    <footer>
      <ul>
        <li style="flex: 1;" class="nav_home">
          <router-link to="mall">    <!--router-link，自动添加class属性变色-->
            <i></i>
            <p>首页</p>
          </router-link>
        </li>
        <li style="flex: 1;" class="nav_shop" @click="tiao()">
          <router-link to="Follow">
            <i></i>
            <p>关注店铺</p>
          </router-link>
        </li>
        <li style="flex: 1;" class="nav_credit" @click="tiao()">
          <router-link to="creditExchange">
            <i></i>
            <p>积分兑换</p>
          </router-link>
        </li>
        <li style="flex: 1;" class="nav_wode" @click="tiao()">
          <router-link to="myHome">
            <i></i>
            <p>我的</p>
          </router-link>
        </li>
      </ul>
    </footer>
  </div>
</template>


<script>
  /* eslint-disable semi */
  import wx from 'weixin-js-sdk'
  import { wxHttpTool,wx_config, http_getParam, get_shopQrcoe,wx_share,wx_hideAllMenu } from '../components/httpUtil/httpUtil'
  import {msg_10046} from '../message/msg_10046'
  export default {
    name: 'home',
    data () {
      return {
//        click: 'a',
        active: ''
//    show: 'false',
      }
    },
    methods: {
      tiao () {
         window.localStorage.loginGo = true
      }
    },
    created(){
      // wxHttpTool.wxAuthor(this, function (varRet, varJson, varThis = this) {
      //   if (varRet == -1) {
      //     varThis.alertTip('网络错误');
      //     varThis.go = function () {
      //       varThis.showAlert = false;
      //     }

      //   }
      //   // 关注钱应该判断下是否已经关注过了
      //   msg_10046.send(varThis,msg_10046.entity(),function(varThis,res){
      //     varThis.wxlist=res.data.p.sign
      //     wx_config(varThis.wxlist);
      //     wx_hideAllMenu();
      //     wx.hideMenuItems({
      //       //禁用单独分享朋友圈QQ空间等功能
      //       menuList: ["menuItem:share:timeline","menuItem:share:QZone","menuItem:share:qq"] // 要隐藏的菜单项，所有menu项见附录3
      //     });
      //   })


      // },this.type)
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .home {
    width: 100%;
    height: 100%;
    /*display: flex;*/
    /*flex-direction: column;*/
    /*padding: 80px 0 0;*/
    box-sizing: border-box;
    background: #f4f4f4;
  }

  section {
    /*flex: 1 1 auto;*/
    /*background-color: #f00;*/
    /*margin-top: 80px;*/
    flex: 1;
    margin-bottom: 95px;
  }

  footer {
    width: 100%;
    height: 95px;
    border-top: 1px solid #ccc;
    text-align: center;
    position:fixed;
    right:0;
    bottom:0;
    background: #fff;
  }

  footer ul {
    display: flex;
    flex-direction: row;
  }

  footer ul li{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 95px;
  }

  footer ul i {
    display: inline-block;
    width: 35px;
    height: 35px;
  }
  footer ul .nav_home i{
    background: url("../assets/images/icon_home1@1x.png") no-repeat;
    background-size: 100%;
  }
  footer ul .nav_shop i{
    background: url("../assets/images/dp.png") no-repeat;
    background-size: 100%;
  }
  footer ul .nav_credit i{
    background: url("../assets/images/jf.png") no-repeat;
    background-size: 100%;
  }
  footer ul .nav_wode i{
    background: url("../assets/images/ico_wode_1@1x.png") no-repeat;
    background-size: 100%;
  }
  .nav_home .router-link-active i{
    background: url("../assets/images/icon_home2@1x.png") no-repeat;
    background-size: 100%;
  }
  .nav_shop .router-link-active i{
    background: url("../assets/images/dp2.png") no-repeat;
    background-size: 100%;
  }
  .nav_credit .router-link-active i{
    background: url("../assets/images/jf2.png") no-repeat;
    background-size: 100%;
  }
  .nav_wode .router-link-active i{
    background: url("../assets/images/ico_wode_2@1x.png") no-repeat;
    background-size: 100%;
  }
  footer ul .router-link-active{
    color: #fe3519;
  }
</style>
